package com.iims.customer.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.iims.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 客户类型
 *
 * @author fanpei
 * @date 2021/6/11 10:48
 */
@ApiModel("客户类型")
@Data
@TableName("cmis_customer_type")
public class CustomerType extends BaseEntity {

    @ApiModelProperty(name = "客户类型D", value = "主键,修改时必传", position = -1)
    @TableId(value = "cus_type_id", type = IdType.AUTO)
    private Long cusTypeTd;

    @ApiModelProperty(value = "类型名称/长度不能超过50个字符", required = true)
    @NotBlank(message = "客户类型名称不能为空")
    @Size(min = 0, max = 50, message = "类型名称长度不能超过50个字符")
    private String cusTypeName;

    @JsonIgnore
    @ApiModelProperty(value = "父部门ID,一级节点为0", hidden = true)
    private Long parentId;
}
